package com.zjw.designPattern.listener.observer;

import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

/**
 * @description:
 * @author: zhangjiawei
 * @createTime:2022/3/9 16:49
 * @modified by:
 */
public class Test {

    public static void main(String[] args) throws Exception {
        Set<ObserverListener> set = new HashSet<>();
        set.add(new FundOfferEventListener());
        set.add(new FundBarometerEventListener());
        EventHandle util = new EventHandle(set);
        FundOffer fundOffer = FundOffer.builder()
                .offerId(6666L)
                .orgName("苹果树科技")
                .publishName("张佳伟")
                .userName("sb")
                .build();
        util.publish(CommonPushMsg.Action.ADD, Collections.singleton(fundOffer),fundOffer);
    }
}
